/*
 * Exercise_2_3_2.h
 *
 *  Created on: 11 déc. 2011
 *      Author: M. Alexandre (malexand314@gmail.com)
 */

#ifndef EXERCISE_2_3_2_H_
#define EXERCISE_2_3_2_H_

#include "../Exercise.h"

/**
 * \brief Exercise 2.3-2
 *        First, we implement the merge sort algorithm as described in the chapter (with sentinels),
 *        and then we implement it like asked in the exercise (without sentinels).
 *        We will sort the tables given in the figure 2.4 and in the exercise 2.3-1.
 */
class Exercise_2_3_2 : public Exercise
{
    public:
        Exercise_2_3_2();
        virtual ~Exercise_2_3_2();

    private:
        virtual void implementation();
        void mergeSortSentinels(int* _aiTableIn, int* _aiTableOut, int _iSize);
        void mergeSort(int* _aiTableIn, int* _aiTableOut, int _iSize);
};

#endif /* EXERCISE_2_3_2_H_ */
